//
//  BodyTableViewCell.m
//  OwnerNews
//
//  Created by lanou3g on 15/8/29.
//  Copyright (c) 2015年 Drawzyn. All rights reserved.
//

#import "BodyTableViewCell.h"
#import "UIImage+ImageDownLoader.h"
#import "FindingManager.h"
#import "FindModel.h"

@implementation BodyTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        [self DrawMyselfCell];
    }
    return self;
}

- (void)DrawMyselfCell {
    //self.contentView.backgroundColor = [UIColor grayColor];
    self.contentView.layer.cornerRadius = 10;
    
    
    _titleView  = [[UIImageView alloc]initWithFrame:CGRectMake(25, 5, 30, 30)];
    _titleView.image = [UIImage imageNamed:@"success"];
    _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(60, 5, 100, 30)];
    _titleLabel.text  = @"My";
    [self.contentView addSubview: _titleView];
    [self.contentView addSubview:_titleLabel];
    
    
    _BodyImaView = [[UIImageView alloc]initWithFrame:CGRectMake(25, 40, self.contentView.bounds.size.width, 200)];
    _BodyImaView.image = [UIImage imageNamed:@"b"];
    _BodyImaView.layer.cornerRadius = 10;
    [self.contentView addSubview:_BodyImaView];
    
    _detialLabel = [[UILabel alloc]initWithFrame:CGRectMake(25, 250, self.contentView.bounds.size.width, 30)];
    _detialLabel.text = @"详情描述";
    [self.contentView addSubview:_detialLabel];
    
    _detialLabel2 = [[UILabel alloc]initWithFrame:CGRectMake(25, 290, self.contentView.bounds.size.width, 30)];
    _detialLabel2.text = @"详情描述2";
    [self.contentView addSubview:_detialLabel2];
    
    _reallyPriceLabel = [[UIButton alloc]initWithFrame:CGRectMake(25, 330, 200, 30)];
    [_reallyPriceLabel setTitle:@"购买" forState:UIControlStateNormal];
    [_reallyPriceLabel setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    _reallyPriceLabel.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
    [self.contentView addSubview:_reallyPriceLabel];
    
    _shareButton = [[UIButton alloc]initWithFrame:CGRectMake(290, 330, 30, 30)];
    [_shareButton setImage:[UIImage imageNamed:@"share1"] forState:UIControlStateNormal];
    [self.contentView addSubview:_shareButton];
    
}

-(CGFloat)MyselfCellHight {
    return _titleLabel.frame.size.height+10 + _BodyImaView.frame.size.height+10 + _detialLabel.frame.size.height+10 + _detialLabel2.frame.size.height+10 + _reallyPriceLabel.frame.size.height + 10 + 30;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
